#include <bits/stdc++.h>
using namespace std;
const int N=1e5+50;
int n;
int a[N];
int main(void){
    scanf("%d",&n);
    for(int i=0;i<n;i++){
        scanf("%d",&a[i]);
    }
    int d=__gcd(a[0],a[1]);
    for(int i=2;i<n;i++){
        d=__gcd(d,a[i]);
    }
    printf("YES\n");
    if(d>1){
        printf("0\n");
        return 0;
    }
    int cnt=0;
    for(int i=0;i<n-1;i++){
        //printf("%d %d %d %d\n",i,a[i],a[i]%2,a[i+1]%2);
        if(a[i]%2==1 && a[i+1]%2==1){
            cnt++;
            a[i]=2;
            a[i+1]=2;
            i++;
        }else if(a[i]%2==1 && a[i+1]%2==0 || a[i]%2==0 && a[i+1]%2==1){
            cnt+=2;
            a[i]=2;
            a[i+1]=2;
            i++;
        }else{
            i++;
        }
    }
    if(a[n-1]%2){
        cnt+=2;
    }
    printf("%d\n",cnt);
    return 0;
}